package com.yaokai.redis;

import redis.clients.jedis.Jedis;

public class Demo01 {

    public static void main(String[] args) {
        Jedis jedis = new Jedis("111.229.8.248",6379);
        jedis.auth("2466629301");
        String ping = jedis.ping();
        System.out.println("连接成功："+ping);

        jedis.set("aaa","我是傻逼");
        System.out.println(jedis.get("aaa"));

        for (String key : jedis.keys("*")) {
            System.out.println(key);
        }


        jedis.close();
    }




}
